package com.celi.scs.system.service;

import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.celi.cii.base.exception.ServiceException;
import com.celi.scs.common.entity.sys.UserSign;
import com.celi.scs.common.jpa.sys.UserSignDao;
import com.celi.scs.system.dao.LiduDao;
import com.celi.scs.system.entity.LiduEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Base64;
import java.util.List;

/**
 * @Author jiangshengjun
 * @Date 2024/8/28
 * @Description
 */
@Service
public class LiduService {

    @Autowired
    private LiduDao liduDao;

    public void insertIntoLidu(LiduEntity entity) {
        liduDao.insertIntoLidu(entity);
    }

    public LiduEntity getLiduByDeviceId(String deviceId) {
        return liduDao.getLiduByDeviceId(deviceId);
    }

    public List<LiduEntity> listLidu(String deviceId, String beginDate, String endDate) {
        return liduDao.listLidu(deviceId, beginDate, endDate);
    }

}
